package ljye.com.ljye.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import ljye.com.ljye.R;
import ljye.com.ljye.dialog.ConsultDialog;

public class Activity_Payment_Order extends Activity {

    public View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            switch (view.getId()) {
                case R.id.back://返回
                    final ConsultDialog dialog=new ConsultDialog(Activity_Payment_Order.this);
                    dialog.setMessage("放弃支付？");
                    dialog.setYesOnclickListener("确定", new ConsultDialog.onYesOnclickListener() {
                        @Override
                        public void onYesClick() {
                            dialog.dismiss();
                            finish();

                        }
                    });
                    dialog.setNoOnclickListener("取消", new ConsultDialog.onNoOnclickListener() {
                        @Override
                        public void onNoClick() {
                            dialog.dismiss();
                        }
                    });
                    dialog.show();
                    break;

                default:
                    break;
            }
        }
    };
    private ImageView back;
    private TextView className;
    private TextView classHour;
    private TextView classAddress;
    private TextView lastmoney;
    private LinearLayout aliPay;
    private LinearLayout wxPay;
    private LinearLayout yinlianPay;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity__payment__order);
        initView();
        back.setOnClickListener(listener);

    }


    private void initView() {
        back = (ImageView) findViewById(R.id.back);
        className = (TextView) findViewById(R.id.class_name);//课名
        classHour = (TextView) findViewById(R.id.class_hour);//课时
        classAddress = (TextView) findViewById(R.id.class_address);//课地址
        lastmoney = (TextView) findViewById(R.id.lastmoney);//金额
        aliPay = (LinearLayout) findViewById(R.id.ali_pay);//支付宝
        wxPay = (LinearLayout) findViewById(R.id.wx_pay);//微信
        yinlianPay = (LinearLayout) findViewById(R.id.yinlian_pay);//银联

    }
}
